<?php

class I18NHelper extends CComponent
{
	protected $missingTranslations = array();
	
	public function init() { }
	
	public function addMessageSource($category, $message)
	{
		$model = MessageSource::model()->findByAttributes(array('category' => $category, 'message' => $message));
		
		if(!$model)
		{
			$model = new MessageSource;
			$model->category = $category;
			$model->message  = $message;
			$model->save();
		}
	}
	
}
